﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace lcs.Web.DemandPlan
{
    public partial class ListBidRelease : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["login"] != null)
                {
                    DataSet ds = Session["login"] as DataSet;

                    string user_id = ds.Tables[0].Rows[0]["user_id"].ToString();

                    BindDaiban("0", user_id);
                }

            }
           
        }

        private void BindDaiban(string workFlow_status, string person_id)
        {

            DataSet check = new Maticsoft.BLL.workFlow().GetDaiBanBidCheck(workFlow_status, person_id, "发标");

            this.GridView1.DataSource = check;
            this.GridView1.DataBind();
        }

        protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "check")
            {
                string dpid = e.CommandArgument.ToString();

                List<Maticsoft.Model.supplier_bidplan_order> l = new Maticsoft.BLL.supplier_bidplan_order().GetModelList(" dpid= " + dpid);

                Session["supplier_bidplan_order"] = l;

                Response.Redirect("BidRelease.aspx");
            }
        }

        protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {

        }
    }
}